package com.zx.oa.service.ClassInfo;

import com.zx.oa.dao.ClassInfo.ClassInfoDao;
import com.zx.oa.dao.ClassInfo.ClassInfoDaoImpl;
import com.zx.oa.entity.CheckJob;
import com.zx.oa.entity.ClassInfo;
import com.zx.oa.entity.Major;

import java.util.List;

public class ClassInfoServiceImpl implements ClassInfoService {
    //数据访问层对象
    ClassInfoDao classInfoDao=new ClassInfoDaoImpl();
    @Override
    public List<ClassInfo> getClassInfo(String type) {
        return classInfoDao.getClassInfo(type) ;
    }

    @Override
    public boolean addClassInfo(String name, String major) {
        return classInfoDao.addClassInfo(name,major);
    }

    @Override
    public ClassInfo getClassInfo(int classId) {
        return classInfoDao.getClassInfo(classId);
    }

    @Override
    public boolean modifyClassInfo(String name, String major, int classId) {
        return classInfoDao.modifyClassInfo(name,major,classId);
    }

    @Override
    public boolean deleteClassInfo(int id) {
        return classInfoDao.deleteClassInfo(id);
    }

    @Override
    public boolean deleteCheckJobInfo(int id) {
        return classInfoDao.deleteCheckJobInfo(id);
    }

    @Override
    public List<ClassInfo> getClassInfo(String type, int currentPageNo, int pageSize) {
        return  classInfoDao.getClassInfo(type,currentPageNo,pageSize);
    }

    @Override
    public List<CheckJob> getClassInfo(String major, String className, String studentName, String date, String result, int currentPageNo, int pageSize) {
        return classInfoDao.getClassInfo(major,className,studentName,date,result,currentPageNo,pageSize);
    }

    @Override
    public List<CheckJob> getClassInfo(String major, String classname, String month) {
        return classInfoDao.getClassInfo(major,classname,month);
    }

    @Override
    public List<ClassInfo> getClassInfoByStudyType(String major) {
        return classInfoDao.getClassInfoByStudyType(major);
    }

    @Override
    public List<Major> getMajorAll() {
        return classInfoDao.getMajorAll();
    }

    @Override
    public List<ClassInfo> getClassAll(String majorName) {
        return classInfoDao.getClassAll(majorName);
    }

    @Override
    public List<CheckJob> getJob() {
        return classInfoDao.getJob();
    }

    @Override
    public boolean updateJob(int id, String cktime, String ckstatu) {
        return classInfoDao.updateJob(id,cktime,ckstatu);
    }
}
